var t = require("../../@babel/runtime/helpers/typeof");

(global.webpackJsonp = global.webpackJsonp || []).push([ [ "retain/retain/index" ], {
    "04f1": function(t, e, n) {
        n.d(e, "b", function() {
            return r;
        }), n.d(e, "c", function() {
            return i;
        }), n.d(e, "a", function() {});
        var r = function() {
            this.$createElement;
            this._self._c;
        }, i = [];
    },
    1538: function(t, e, n) {
        n.r(e);
        var r = n("04f1"), i = n("5952");
        for (var a in i) "default" !== a && function(t) {
            n.d(e, t, function() {
                return i[t];
            });
        }(a);
        n("736a");
        var o = n("f0c5"), c = Object(o.a)(i.default, r.b, r.c, !1, null, "f26cc5f2", null, !1, r.a, void 0);
        e.default = c.exports;
    },
    "3e8a": function(t, e, n) {},
    5952: function(t, e, n) {
        n.r(e);
        var r = n("ab1a"), i = n.n(r);
        for (var a in r) "default" !== a && function(t) {
            n.d(e, t, function() {
                return r[t];
            });
        }(a);
        e.default = i.a;
    },
    "736a": function(t, e, n) {
        var r = n("3e8a");
        n.n(r).a;
    },
    "9c53": function(t, e, n) {
        (function(t) {
            n("1067"), r(n("66fd"));
            var e = r(n("1538"));
            function r(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = n, t(e.default);
        }).call(this, n("543d").createPage);
    },
    ab1a: function(e, n, r) {
        (function(e) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0, r("7960");
            var i = r("1ff5"), a = r("8434"), o = r("b806"), c = (function(e) {
                if (e && e.__esModule) return e;
                if (null === e || "object" !== t(e) && "function" != typeof e) return {
                    default: e
                };
                var n = u();
                if (n && n.has(e)) return n.get(e);
                var r = {}, i = Object.defineProperty && Object.getOwnPropertyDescriptor;
                for (var a in e) if (Object.prototype.hasOwnProperty.call(e, a)) {
                    var o = i ? Object.getOwnPropertyDescriptor(e, a) : null;
                    o && (o.get || o.set) ? Object.defineProperty(r, a, o) : r[a] = e[a];
                }
                r.default = e, n && n.set(e, r);
            }(r("03b8")), r("a71e"));
            function u() {
                if ("function" != typeof WeakMap) return null;
                var t = new WeakMap();
                return u = function() {
                    return t;
                }, t;
            }
            function s(t, e) {
                var n = Object.keys(t);
                if (Object.getOwnPropertySymbols) {
                    var r = Object.getOwnPropertySymbols(t);
                    e && (r = r.filter(function(e) {
                        return Object.getOwnPropertyDescriptor(t, e).enumerable;
                    })), n.push.apply(n, r);
                }
                return n;
            }
            function f(t, e, n) {
                return e in t ? Object.defineProperty(t, e, {
                    value: n,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : t[e] = n, t;
            }
            var l = {
                data: function() {
                    return {
                        iconList: [ {
                            img: "/static/retain/retainOrder.png",
                            txt: "分销订单",
                            url: "/retain/retain/retainOrder"
                        }, {
                            img: "/static/retain/withdrawalDetails.png",
                            txt: "提现明细",
                            url: "/retain/retain/withdrawalDetails"
                        }, {
                            img: "/static/retain/retainCom.png",
                            txt: "分销佣金",
                            url: "/retain/retain/retainMoney"
                        }, {
                            img: "/static/retain/myTteam.png",
                            txt: "我的团队",
                            url: "/retain/retain/myTeam"
                        }, {
                            img: "/static/retain/poster.png",
                            txt: "分销海报"
                        }, {
                            img: "/static/retain/contact.png",
                            txt: "联系客服",
                            url: "/pages/contact/contact"
                        } ],
                        isShow: !1,
                        user_id: "",
                        pageData: {
                            wallet: {
                                bktx_money: "0.00",
                                ktx_money: "0.00",
                                txz_money: "0.00",
                                ytx_money: "0.00",
                                zyj_money: "0.00"
                            }
                        },
                        params: {
                            type: 2
                        },
                        show_share: !1
                    };
                },
                computed: function(t) {
                    for (var e = 1; e < arguments.length; e++) {
                        var n = null != arguments[e] ? arguments[e] : {};
                        e % 2 ? s(Object(n), !0).forEach(function(e) {
                            f(t, e, n[e]);
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : s(Object(n)).forEach(function(e) {
                            Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
                        });
                    }
                    return t;
                }({}, (0, (r("db8f"), r("26cb")).mapGetters)([ "mainColor", "user", "iphoneXStyle" ])),
                onLoad: function(t) {
                    (0, c.isEmpty)(t.pid) || store.commit("config/SET_PID", t.pid), (0, c.isEmpty)(decodeURIComponent(t.scene).split("pid=")[1]) || store.commit("config/SET_PID", decodeURIComponent(t.scene).split("pid=")[1]);
                },
                onShow: function() {
                    var t = this;
                    (0, o.init)(t).then(function(e) {
                        t.getInfo();
                    });
                },
                mounted: function() {},
                methods: {
                    getInfo: function() {
                        var t = this;
                        (0, i.distributeState)({}).then(function(e) {
                            switch (e.is_distributor) {
                              case "1":
                                (0, a.route)({
                                    url: "/retain/retain/addRetain",
                                    type: 3,
                                    data: {}
                                });
                                break;

                              case "2":
                                (0, a.route)({
                                    url: "/pages/result/result?type=1&op=1",
                                    type: 3,
                                    data: {
                                        is_distributor: 2
                                    }
                                });
                                break;

                              case "3":
                                t.isShow = !0, t.getDistributeInfo();
                                break;

                              case "4":
                                (0, a.route)({
                                    url: "/pages/result/result?type=1&op=2",
                                    type: 3,
                                    data: {
                                        is_distributor: 2,
                                        reason: e.jujue_content
                                    }
                                });
                            }
                        }).catch(function(t) {
                            return console.log(t);
                        });
                    },
                    getDistributeInfo: function() {
                        var t = this, n = this;
                        (0, i.distributeSet)({
                            isLoading: !1
                        }).then(function(r) {
                            t.pageData = r, e.setNavigationBarTitle({
                                title: r.fxzx_title
                            }), t.iconList[0].txt = r.fxdd_title, t.iconList[1].txt = r.txmx_title, t.iconList[2].txt = r.fxyj_title, 
                            t.iconList[3].txt = r.wdtd_title, t.iconList[4].txt = r.wdfxm_title, t.iconList[5].txt = r.lxkf_title, 
                            1 == r.rank_state && 6 == t.iconList.length && n.iconList.push({
                                img: "/static/retain/rank.png",
                                txt: r.rank_name,
                                url: ""
                            });
                        });
                    },
                    withdraw: function() {
                        e.navigateTo({
                            url: "/retain/retain/retainMoney"
                        });
                    },
                    navToUrl: function(t, n) {
                        if (3 == n) {
                            if (0 == this.pageData.rank) return;
                            t.url = "/retain/retain/myTeam?rank=" + this.pageData.rank;
                        }
                        4 != n ? (6 == n && (t.url = "/retain/retain/rank"), t.url && e.navigateTo({
                            url: t.url
                        })) : this.$refs.BotShow.getPoster();
                    }
                }
            };
            n.default = l;
        }).call(this, r("543d").default);
    }
}, [ [ "9c53", "common/runtime", "common/vendor" ] ] ]);